
<!DOCTYPE html>
<html lang="zh-CN" class="loading">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>分类: leetcode百题计划 - peony&#39;s blogs</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="google" content="notranslate" />
    <meta name="keywords" content="peony,"> 
    
    <meta name="author" content="peony"> 
    <link rel="alternative" href="atom.xml" title="peony&#39;s blogs" type="application/atom+xml"> 
    <link rel="icon" href="/img/favicon63.png"> 
    
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">

    
<link rel="stylesheet" href="/css/diaspora.css">

    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({
              google_ad_client: "ca-pub-8691406134231910",
              enable_page_level_ads: true
         });
    </script>
    <script async custom-element="amp-auto-ads"
        src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js">
    </script>
<meta name="generator" content="Hexo 4.2.0"></head>

<body class="loading">
    <span id="config-title" style="display:none">peony&#39;s blogs</span>
    <div id="loader"></div>
    <div class="nav">
    <ul id="menu-menu" class="menu">
        
        <li class="pview menu-item menu-item-type-post_type menu-item-object-page">
            <a href="/whoami/" title="Whoami" target="_blank" rel="noopener">Whoami</a>
        </li>
        
        <li class="  menu-item menu-item-type-post_type menu-item-object-page">
            <a href="https://github.com/PPeony" title="Github(目前没有任何项目，除了这篇博客)" target="_blank" rel="noopener">Github(目前没有任何项目，除了这篇博客)</a>
        </li>
        
        <li class="  menu-item menu-item-type-post_type menu-item-object-page">
            <a href="https://leetcode-cn.com/u/peony-2/" title="leetcode" target="_blank" rel="noopener">leetcode</a>
        </li>
        
        <li class="  menu-item menu-item-type-post_type menu-item-object-page">
            <a href="https://blog.csdn.net/qq_15764477" title="CSDN" target="_blank" rel="noopener">CSDN</a>
        </li>
        
        <li class="pview menu-item menu-item-type-post_type menu-item-object-page">
            <a href="/categories/" title="分类" target="_blank" rel="noopener">分类</a>
        </li>
        
    </ul>
    <p id="copyright">
        &copy; 2020 peony.
        Powered by <a href="http://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a>
        Theme <a href="https://github.com/Fechin/hexo-theme-diaspora" title="Diaspora" target="_blank" rel="noopener">Diaspora</a>
        by Fechin
    </p>
</div>

<div id="container">
    
<div id="screen">
    <div id="mark">
        <div class="layer" data-depth="0.4">
            <img src="/img/welcome-cover2.jpg" id="cover" crossorigin="anonymous" width="1920" height="1080">
        </div>
    </div>
    <div id="vibrant">
        <svg viewBox="0 0 2880 1620" height="100%" preserveAspectRatio="xMaxYMax slice">
            <polygon opacity="0.7" points="2000,1620 0,1620 0,0 600,0 "/>
        </svg>
        <div></div>
    </div>
    <div id="header">
        <div>
            <a class="image-logo" href="/"></a>
            <div class="icon-menu switchmenu"></div>
        </div>
    </div>
    
    <div id="post0">
        <p>四月 11, 2020</p>
        <h2><a href="/2020/04/11/leetcode516-%E6%9C%80%E9%95%BF%E5%9B%9E%E6%96%87%E5%AD%90%E5%BA%8F%E5%88%97-%E9%99%84%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92%E7%8A%B6%E6%80%81%E5%9B%BE/" title="leetcode516. 最长回文子序列-附动态规划状态图" class="posttitle">leetcode516. 最长回文子序列-附动态规划状态图</a></h2>
        <p class="summary">leetcode516. 最长回文子序列

给定一个字符串s，找到其中最长的回文子序列。可以假设s的最大长度为10...</p>
    </div>
    
</div>

    <div id="primary">
        
<div class="post">
    <a href="/2020/04/11/leetcode647-%E5%9B%9E%E6%96%87%E5%AD%90%E4%B8%B2-%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92/" title="leetcode647. 回文子串-动态规划">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>四月 11, 2020</p>
        <h3><a href="/2020/04/11/leetcode647-%E5%9B%9E%E6%96%87%E5%AD%90%E4%B8%B2-%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92/" title="leetcode647. 回文子串-动态规划" class="posttitle">leetcode647. 回文子串-动态规划</a></h3>
        <p>leetcode647. 回文子串

给定一个字符串，你的任务是计算这个字符串中有多少个回文子串。具有不同开始位置或结束位置的子串，即使是由相同的字符组成...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/04/11/leetcode5-%E6%9C%80%E9%95%BF%E5%9B%9E%E6%96%87%E5%AD%90%E4%B8%B2-%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92%E8%AF%A6%E7%BB%86%E8%A7%A3%E9%87%8A%E6%97%A0%E5%90%8E%E6%95%88%E6%80%A7/" title="leetcode5. 最长回文子串-动态规划详细解释无后效性">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>四月 11, 2020</p>
        <h3><a href="/2020/04/11/leetcode5-%E6%9C%80%E9%95%BF%E5%9B%9E%E6%96%87%E5%AD%90%E4%B8%B2-%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92%E8%AF%A6%E7%BB%86%E8%A7%A3%E9%87%8A%E6%97%A0%E5%90%8E%E6%95%88%E6%80%A7/" title="leetcode5. 最长回文子串-动态规划详细解释无后效性" class="posttitle">leetcode5. 最长回文子串-动态规划详细解释无后效性</a></h3>
        <p>leetcode5. 最长回文子串

给定一个字符串 s，找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。


示例 1：


输入:...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/04/11/leetcode22-%E6%8B%AC%E5%8F%B7%E7%94%9F%E6%88%90/" title="leetcode22. 括号生成">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>四月 11, 2020</p>
        <h3><a href="/2020/04/11/leetcode22-%E6%8B%AC%E5%8F%B7%E7%94%9F%E6%88%90/" title="leetcode22. 括号生成" class="posttitle">leetcode22. 括号生成</a></h3>
        <p>leetcode22. 括号生成

数字 n 代表生成括号的对数，请你设计一个函数，用于能够生成所有可能的并且 有效的 括号组合。


示例：输入：n =...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/04/11/leetcode%E9%9D%A2%E8%AF%95%E9%A2%9813-%E6%9C%BA%E5%99%A8%E4%BA%BA%E7%9A%84%E8%BF%90%E5%8A%A8%E8%8C%83%E5%9B%B4/" title="leetcode面试题13. 机器人的运动范围">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>四月 11, 2020</p>
        <h3><a href="/2020/04/11/leetcode%E9%9D%A2%E8%AF%95%E9%A2%9813-%E6%9C%BA%E5%99%A8%E4%BA%BA%E7%9A%84%E8%BF%90%E5%8A%A8%E8%8C%83%E5%9B%B4/" title="leetcode面试题13. 机器人的运动范围" class="posttitle">leetcode面试题13. 机器人的运动范围</a></h3>
        <p>leetcode面试题13. 机器人的运动范围

地上有一个m行n列的方格，从坐标 [0,0] 到坐标 [m-1,n-1] 。一个机器人从坐标 [0, 0...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/04/11/leetcode%E9%9D%A2%E8%AF%95%E9%A2%98-01-07-%E6%97%8B%E8%BD%AC%E7%9F%A9%E9%98%B5/" title="leetcode面试题 01.07. 旋转矩阵">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>四月 11, 2020</p>
        <h3><a href="/2020/04/11/leetcode%E9%9D%A2%E8%AF%95%E9%A2%98-01-07-%E6%97%8B%E8%BD%AC%E7%9F%A9%E9%98%B5/" title="leetcode面试题 01.07. 旋转矩阵" class="posttitle">leetcode面试题 01.07. 旋转矩阵</a></h3>
        <p>leetcode面试题 01.07. 旋转矩阵

给你一幅由 N × N 矩阵表示的图像，其中每个像素的大小为 4 字节。请你设计一种算法，将图像旋转 9...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/04/11/leetcode120-%E4%B8%89%E8%A7%92%E5%BD%A2%E6%9C%80%E5%B0%8F%E8%B7%AF%E5%BE%84%E5%92%8C/" title="leetcode120. 三角形最小路径和">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>四月 11, 2020</p>
        <h3><a href="/2020/04/11/leetcode120-%E4%B8%89%E8%A7%92%E5%BD%A2%E6%9C%80%E5%B0%8F%E8%B7%AF%E5%BE%84%E5%92%8C/" title="leetcode120. 三角形最小路径和" class="posttitle">leetcode120. 三角形最小路径和</a></h3>
        <p>leetcode120. 三角形最小路径和
给定一个三角形，找出自顶向下的最小路径和。每一步只能移动到下一行中相邻的结点上。
例如，给定三角形：
[   ...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/04/11/leetcode1111-%E6%9C%89%E6%95%88%E6%8B%AC%E5%8F%B7%E7%9A%84%E5%B5%8C%E5%A5%97%E6%B7%B1%E5%BA%A6/" title="leetcode1111. 有效括号的嵌套深度">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>四月 11, 2020</p>
        <h3><a href="/2020/04/11/leetcode1111-%E6%9C%89%E6%95%88%E6%8B%AC%E5%8F%B7%E7%9A%84%E5%B5%8C%E5%A5%97%E6%B7%B1%E5%BA%A6/" title="leetcode1111. 有效括号的嵌套深度" class="posttitle">leetcode1111. 有效括号的嵌套深度</a></h3>
        <p>leetcode1111. 有效括号的嵌套深度

示例 1：输入：seq = “(()())”输出：[0,1,1,1,1,0]


示例 2：输入：seq...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/04/11/leetcode322-%E9%9B%B6%E9%92%B1%E5%85%91%E6%8D%A2/" title="leetcode322. 零钱兑换">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>四月 11, 2020</p>
        <h3><a href="/2020/04/11/leetcode322-%E9%9B%B6%E9%92%B1%E5%85%91%E6%8D%A2/" title="leetcode322. 零钱兑换" class="posttitle">leetcode322. 零钱兑换</a></h3>
        <p>leetcode322. 零钱兑换

给定不同面额的硬币 coins 和一个总金额 amount。编写一个函数来计算可以凑成总金额所需的最少的硬币个数。如...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/04/11/leetcode%E9%9D%A2%E8%AF%95%E9%A2%9847-%E7%A4%BC%E7%89%A9%E7%9A%84%E6%9C%80%E5%A4%A7%E4%BB%B7%E5%80%BC/" title="leetcode面试题47. 礼物的最大价值">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>四月 11, 2020</p>
        <h3><a href="/2020/04/11/leetcode%E9%9D%A2%E8%AF%95%E9%A2%9847-%E7%A4%BC%E7%89%A9%E7%9A%84%E6%9C%80%E5%A4%A7%E4%BB%B7%E5%80%BC/" title="leetcode面试题47. 礼物的最大价值" class="posttitle">leetcode面试题47. 礼物的最大价值</a></h3>
        <p>leetcode面试题47. 礼物的最大价值

在一个 m*n 的棋盘的每一格都放有一个礼物，每个礼物都有一定的价值（价值大于 0）。你可以从棋盘的左上角...</p>
    </div>
</div>


    </div>
    
    <div id="pager"><a href="/categories/leetcode%E7%99%BE%E9%A2%98%E8%AE%A1%E5%88%92/diaspora/2/" class="more">加载更多</a></div>
    
</div>
<div id="preview"></div>


</body>

<script src="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>


<script src="//lib.baomitu.com/jquery/1.8.3/jquery.min.js"></script>
<script src="/js/plugin.js"></script>
<script src="/js/diaspora.js"></script>


<link rel="stylesheet" href="/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/photoswipe/default-skin/default-skin.css">


<script src="/photoswipe/photoswipe.min.js"></script>
<script src="/photoswipe/photoswipe-ui-default.min.js"></script>


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>




</html>
